package com.xht.blog.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Blog 控制器
 */
@Controller
@RequestMapping("/blogs")
public class BlogController {

    @GetMapping
    public String listBolgs(@RequestParam(value = "order",required = false,defaultValue = "new")String order,
                            @RequestParam(value = "keyword",required = false,defaultValue = "")String Keyword){
        System.out.print("order:"+order+",Keyword:"+Keyword);
        return "redirect:/index?order="+order+"&Keyword="+Keyword;
    }
}
